package org.example;
import org.example.bean.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.example.bean.Product;
public class App
{
    public static void main( String[] args )
    {
        ApplicationContext context1 = new ClassPathXmlApplicationContext("beans.xml");
        Product p1=(Product) context1.getBean("p1");
        System.out.println( p1 );
        ApplicationContext context2 = new ClassPathXmlApplicationContext("beans.xml");
        Student p2=(Student) context2.getBean("p2");
        System.out.println( p2 );
    }
}